package com.erp.bean;

import androidx.fragment.app.Fragment;
import com.erp.R;
import com.erp.mclass.QuanXian;
import com.erp.module.anZhuangZHiNan.FragmentKAnZhuangZhiNan;
import com.erp.module.caiLiaoZhiLiang.FragmentKCaiLiaoZhiLiang;
import com.erp.module.crm.FragmentCrm;
import com.erp.module.dingDan.FragmentDingDan;
import com.erp.module.kaoShi.FragmentKKaoShi;
import com.erp.module.sheJiZhiNan.FragmentSheJiZhiNan;

import java.util.ArrayList;

public class MainItemBeans {
    private ArrayList<MainItemBean> list;
    public ArrayList<MainItemBean> getDatas(){
        if(list == null){
            list = new ArrayList<MainItemBean>();
            addMianItem(QuanXian.Companion.getIsgonggao(),"公告",R.mipmap.shouye_04,9);
            addMianItem(QuanXian.Companion.getIsdeliver(),"物流信息",R.mipmap.shouye_18,10);
            addMianItem(QuanXian.Companion.isZhuanMaiDianKaoShi() || QuanXian.Companion.isShengChanZhongXingKaoShi() || QuanXian.Companion.isShengChanZhongXingKaoShi(),
                    "考试中心",R.mipmap.shouye_02,20);
            addMianItem(QuanXian.Companion.getIscrm(),"订单信息",R.mipmap.shouye_01,30);
            addMianItem(QuanXian.Companion.isChaKanCaiLiaoZhiLiang(),"来料质量",R.mipmap.shouye_12,40);
            addMianItem(QuanXian.Companion.isSheJiZhiNan(),"设计指南",R.mipmap.shouye_31,50);
            addMianItem(QuanXian.Companion.isAnZhuangZhiNan(),"安装图纸",R.mipmap.shouye_110,60);
            addMianItem(QuanXian.Companion.getIsscdd(),"订单进度",R.mipmap.shouye_05,70);
            addMianItem(QuanXian.Companion.isChaKanWuLiaoZhiLiang(),"板材质量",R.mipmap.shouye_03,80);
            addMianItem(QuanXian.Companion.isViewPackPiece(),"计件采集",R.mipmap.shouye_17,90);
            addMianItem(QuanXian.Companion.isChaKanTouSuJianYi(),"投诉建议",R.mipmap.shouye_15,100);
            addMianItem(QuanXian.Companion.isEditProjectOrderProcess(),"完工采集",R.mipmap.shouye_08,110);
            addMianItem(QuanXian.Companion.isXingKaiZhuanMaiDian(),"门店列表",R.mipmap.shouye_14,120);
            addMianItem(QuanXian.Companion.isShuangChuanAnZhuang(),"项目管理",R.mipmap.shouye_21,130);
            addMianItem(QuanXian.Companion.isViewArticle(),"资料文件",R.mipmap.shouye_13,140);
            addMianItem(QuanXian.Companion.isViewOemOrder(),"外协进度",R.mipmap.shouye_05,150);
            addMianItem(QuanXian.Companion.isViewStatementAccountPhoto(),"对账上传",R.mipmap.shouye_06,160);
            addMianItem(QuanXian.Companion.isViewYuliaoFreightSpaceGi(),"余料入仓",R.mipmap.shouye_20,170);
            addMianItem(QuanXian.Companion.isGatherPieceworkColl(),"节号采集",R.mipmap.shouye_20,180);
            addMianItem(QuanXian.Companion.isPrintYuliaoLabel(),"余料打印",R.mipmap.shouye_17,190);
            addMianItem(QuanXian.Companion.isViewOemOrder(),"采购管理",R.mipmap.shouye_17,200);
            addMianItem(QuanXian.Companion.isViewProcessInspection(),"制程检验",R.mipmap.shouye_29,210);
            addMianItem(QuanXian.Companion.isViewElaborateManagement(),"精细化",R.mipmap.shouye_105,220);
            addMianItem(QuanXian.Companion.isChakanJiaFang(),"家纺",R.mipmap.shouye_07,230);
            addMianItem(QuanXian.Companion.isViewBoardCartonDistribution(),"吸塑纸箱",R.mipmap.shouye_24,240);
            addMianItem(QuanXian.Companion.isChaKanZhiXiangFenPei(),"纸箱分配",R.mipmap.shouye_24,250);
            addMianItem(QuanXian.Companion.getIschakanjiehao(),"节号分配",R.mipmap.shouye_22,260);
            addMianItem(QuanXian.Companion.isJiJianCaiJi(),"计件采集",R.mipmap.shouye_27,270);
            addMianItem(QuanXian.Companion.getIsjijian(),"计件",R.mipmap.shouye_104,280);
            addMianItem(QuanXian.Companion.isPmcPcode() && QuanXian.Companion.isPMCDuiHao(),"堆号打印",R.mipmap.shouye_10,290);
            addMianItem(QuanXian.Companion.isCreateStoresRequisition(),"合包打印",R.mipmap.shouye_10,300);
        }
        return list;
    }
    public void addMianItem(boolean quanxian,String title,int imgId,int code){
        if(quanxian){
            list.add(new MainItemBean(title, imgId,code));
        }
    }
    public MainItemBean addMianitem(String title,int imgId,int code){
        return new MainItemBean(title,imgId,code);
    }
    public class MainItemBean {
        public MainItemBean(String title,int imgId,int code){
            this.title = title;
            this.imgId = imgId;
            this.code = code;
        }
        private String title;
        private int imgId;
        private int code;

        public String getTitle() {
            return title;
        }

        public int getImgId() {
            return imgId;
        }

        public int getCode() {
            return code;
        }

        @Override
        public String toString() {
            return "MainItemBean{" +
                    "title='" + title + '\'' +
                    ", imgId=" + imgId +
                    ", code=" + code +
                    '}';
        }
    }
}


